<template>
  <div>
    爸爸组件
    <div class="box">

    </div>
    <hr>
    <ProvideB></ProvideB>
  </div>
</template>
<script setup lang='ts'>
import ProvideB from './provideB.vue';
import { inject } from 'vue';
import type { Ref } from 'vue';

const color = inject<Ref<string>>('color')
</script>
<style scoped lang='less'>
.box {
  height: 100px;
  width: 100px;
  border: 1px solid #ccc;
  background: v-bind(color);
}
</style>